package com.supor.aiot.common.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * ---------------------------------------------------------------- <br>
 * Copyright (C) 2014-2020, by het, Shenzhen, All rights reserved.  <br>
 * ---------------------------------------------------------------- <br>
 * <p>
 * 描述:
 *      "agreementId": 1,
 *      "agreementType": "USERSERVERAGREE",
 *      "agreementStatus": "NORMAL",
 *      "createTime": "2020-10-23",
 *      "lastUpdate": "2021-03-24 17:20:31",
 *      "isDel": 0,
 *      "note": null,
 *      "remark": null,
 *      "agreementContext": ""
 * releaseTime	生效时间	19	否	字符串
 * deadTime	失效时间	19	否	字符串
 * needJump	是否需要跳转	8	否	字符串	1需要|0不需要
 * redirectUrl	跳转链接	500		字符串	1外链：直接外链地址|2详情页：食谱id|3待定
 * urlType	链接类型	64		字符串	1外链|2详情页|3搜索页
 * 作者: lei <br>
 * 日期: 2020/12/8 <br>
 */
public class LaunchPageBean implements Parcelable {
    public String createTime;

    public String lastUpdate;

    public int isDel;

    public String note;

    public String pictureDescribe;

    public String pictureId;

    public String pictureImage;

    public String remark;

    public String effectTime;

    public String invalidTime;

    public String needJump;

    public String redirectUrl;

    public String urlType;

    public LaunchPageBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.createTime);
        dest.writeString(this.lastUpdate);
        dest.writeInt(this.isDel);
        dest.writeString(this.note);
        dest.writeString(this.pictureDescribe);
        dest.writeString(this.pictureId);
        dest.writeString(this.pictureImage);
        dest.writeString(this.remark);
        dest.writeString(this.effectTime);
        dest.writeString(this.invalidTime);
        dest.writeString(this.needJump);
        dest.writeString(this.redirectUrl);
        dest.writeString(this.urlType);
    }

    protected LaunchPageBean(Parcel in) {
        this.createTime = in.readString();
        this.lastUpdate = in.readString();
        this.isDel = in.readInt();
        this.note = in.readString();
        this.pictureDescribe = in.readString();
        this.pictureId = in.readString();
        this.pictureImage = in.readString();
        this.remark = in.readString();
        this.effectTime = in.readString();
        this.invalidTime = in.readString();
        this.needJump = in.readString();
        this.redirectUrl = in.readString();
        this.urlType = in.readString();
    }

    public static final Creator<LaunchPageBean> CREATOR = new Creator<LaunchPageBean>() {
        @Override
        public LaunchPageBean createFromParcel(Parcel source) {
            return new LaunchPageBean(source);
        }

        @Override
        public LaunchPageBean[] newArray(int size) {
            return new LaunchPageBean[size];
        }
    };

    @Override
    public String toString() {
        return "LaunchPageBean{" +
                "createTime='" + createTime + '\'' +
                ", lastUpdate='" + lastUpdate + '\'' +
                ", isDel=" + isDel +
                ", note='" + note + '\'' +
                ", pictureDescribe='" + pictureDescribe + '\'' +
                ", pictureId='" + pictureId + '\'' +
                ", pictureImage='" + pictureImage + '\'' +
                ", remark='" + remark + '\'' +
                ", releaseTime='" + effectTime + '\'' +
                ", deadTime='" + invalidTime + '\'' +
                ", needJump='" + needJump + '\'' +
                ", redirectUrl='" + redirectUrl + '\'' +
                ", urlType='" + urlType + '\'' +
                '}';
    }
}
